﻿using System;
using SportTraining.Core.Dal;

namespace SportTraining.Core.Linq2Sql.Dal
{
    public abstract class BaseDal
    {
        protected SportTrainingDataContext dataContext;

        protected BaseDal(IDataContext dataContext)
        {
            if (!(dataContext is SportTrainingDataContext))
            {
                throw new ArgumentNullException("dataContext");
            }

            this.dataContext = (SportTrainingDataContext)dataContext;
        }
    }
}
